import math


def Globe(data: dict):
    """
    计算圆球体，输入一个字典，返回一个字典
    :param data:字典
    {
    d：圆球直径
    }

    :return res:字典
    {
    "Sphere_surface_area"：球体表面积
    "Sphere_volume"：球体体积
    }
    """
    if "d" in data:
        d = data["d"]
        Sphere_surface_area = math.pi * d * d
        Sphere_volume = 4 * math.pi * (d / 2) * (d / 2) * (d / 2) / 3
    else:
        pass
    return {
        "Sphere_surface_area" : Sphere_surface_area,
        "Sphere_volume" : Sphere_volume
    }


def test():
    """
    测试函数
    :return:
    """
    data = {
        "d": 3,
    }
    res = Globe(data)
    print(res)


test()
